module evolucao
use parametros
use coeficientes

contains
function evolution_ket(ket,s,j,k)
implicit none
complex*16,dimension(1:4,-dm:dm,-dm:dm)::ket
integer::s,j,k

						if(ket0(s,j,k) .NE. (0.0d0,0.0d0)) then			
				   ket(1,j+1,k)=ket(1,j+1,k)+coef(1,s,j,k)*ket0(s,j,k)
				   ket(2,j-1,k)=ket(2,j-1,k)+coef(2,s,j,k)*ket0(s,j,k)
				   ket(3,j,k+1)=ket(3,j,k+1)+coef(3,s,j,k)*ket0(s,j,k)
				   ket(4,j,k-1)=ket(4,j,k-1)+coef(4,s,j,k)*ket0(s,j,k)
				  endif


end module evolucao
